//
//  LCYAddCommentController.m
//  EPA
//
//  Created by lanou3g on 16/4/27.
//  Copyright © 2016年 liu. All rights reserved.
//

#import "LCYAddCommentController.h"
#import "LCYNetWorkRequestManager.h"
#import "LCYUserInfoManager.h"
@interface LCYAddCommentController ()
@property (weak, nonatomic) IBOutlet UITextView *textView;

@end

@implementation LCYAddCommentController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"发表评论";
    
}

- (IBAction)didPubCommentBtn:(UIButton *)sender {
    [LCYNetWorkRequestManager requestURL:[NSURL URLWithString:@"http://api2.pianke.me/comment/add"] RequestMethod:LCY_POST Params:@{@"auth":[LCYUserInfoManager shareManager].auth,@"client":@"1",@"content":self.textView.text,@"contentid":(NSString *)self.contentid,@"deviceid":@"6D4DD967-5EB2-40E2-A202-37E64F3BEA31",@"recid":@"",@"reuid":@"",@"version":@"3.0.6"} Result:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSLog(@"%@",[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]);
        /// 发送成功
        if (data) {
            NSLog(@"发送成功");
        }
    }];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
